package model.objects;

import java.awt.Rectangle;
import java.awt.image.BufferedImage;

import javax.swing.JPanel;

import model.general.LoadImage;
import model.general.Location;
import model.general.Util;
import model.move.IMove;

public abstract class Sprites {
	protected Location location;
	protected String srcImg;
	protected BufferedImage img;
	protected Rectangle rect;
	protected LoadImage loadImage = new LoadImage();
	protected int width = Util.DEFAULT_WIDTH, height = Util.DEFAULT_HEIGHT;
	
	public Sprites(int x, int y, String srcImg){
		this.location = new Location(x, y);
		this.srcImg = srcImg;
		this.img = loadImage.getbufferImage(srcImg);
		this.width = img.getWidth();
		this.height = img.getHeight();
		rect = new Rectangle(x, y, width, height);
	}
	
	public Rectangle getBounds() {
		return rect;
	}
	
	public void setBounds(Rectangle rect){
		this.rect = rect;
	}
	
}
